package com.campusevaluation.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.domain.AuditorAware;
import org.springframework.data.mongodb.config.EnableMongoAuditing;
import java.util.Date;
import java.util.Optional;

@Configuration
@EnableMongoAuditing
public class MongoAuditConfig {
    @Bean
    public AuditorAware<Date> auditorProvider() {
        return ()-> Optional.of(new Date());
    }
}
